<?php
require ('model.php');

/*
if ($_SERVER['REQUEST_METHOD'] == 'POST') 
{
	insert_comment($_POST);
	header("HTTP/1.1 301 Moved Permanently"); 
	header("location: {$_SERVER['PHP_SELF']}?news_id={$_POST['news_id']}");
	exit;
}
*/

if (isset($_GET['page']))
{
	if ($_GET['page'] == 'comments')
	{
		$news_x = get_news(0);
		require ('view.php');
		/*Page comments pas faite, je charge la page d'accueil quoi qu'il arrive.*/
	}
}
else
{
	$news_x = get_news(0);
	/*$comments = get_comments($_GET['nb_news']);*/
	require ('view.php');
}
?>